﻿using UnityEngine;
using System.Collections;

public class GlobalManager : MonoBehaviour
{

    public static GlobalManager globalManager;
    public static bool win;
    public static int level;
    public static int maxLevel;
    public static int score;

    // 单例模式
    void Awake ()
    {
        if (GlobalManager.globalManager != null)
        {
            Destroy (this.gameObject);
        }
        GlobalManager.globalManager = this;
        maxLevel = 3;
        level = 1;
    }

    // Update is called once per frame
    void Update ()
    {
    
    }

    public void play ()
    {
        Application.LoadLevel (1);
    }
}
